<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="./Template/templateClient.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="content">
        <h:form onclick="tooltip.show()"> 

            <p:overlayPanel id="overlay" for="test" at="left top" widgetVar="panneauOverlay" 
                            style="width:90%;height:90%">
                <h:form>
                    <p:commandButton value="Masquer" onclick="panneauOverlay.hide()"/>
                </h:form>
                
                <img src="/images/image.png" alt="TAMERE"/>
                
            </p:overlayPanel>
            
            <h:inputHidden id="test"/>
            
            <p:layout style="height: 700px;">
                <p:layoutUnit position="center">
                    <p:mindmap id="mindmap" value="#{mindMapManagedBean.root}" style="height:680px;">  
                        <p:ajax event="select" listener="#{mindMapManagedBean.onNodeSelect}" update="output" />  
                        <p:ajax event="dblselect" listener="#{mindMapManagedBean.onNodeDblselect}" oncomplete="panneauOverlay.show()"/>  
                    </p:mindmap> 
                </p:layoutUnit>
                
                <p:layoutUnit id="layoutUnit" position="east" header="#{bundle.details}" size="30%" collapsible="true">
                    <p:panel widgetVar="details">  
                        <h:outputText id="output" value="#{mindMapManagedBean.texte}" />
                    </p:panel>  
                </p:layoutUnit> 
                
                <p:layoutUnit position="west" header="#{bundle.help}" size="15%" collapsible="true" closable="true">
                    <ul>
                        <li>#{bundle.helpClick}</li><br/>
                        <li>#{bundle.helpDoubleClick}</li>
                    </ul>
                </p:layoutUnit>
            </p:layout>
        </h:form>
    </ui:define>
</ui:composition>
